<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>欢迎您</title>
		<LINK rel=stylesheet type=text/css href="<?php echo base_url('application/views/css/css.css');?>">
		<SCRIPT type=text/javascript src="<?php echo base_url('application/views/js/jquery.js');?>"></SCRIPT>
		<SCRIPT type=text/javascript src="<?php echo base_url('application/views/js/js.js');?>"></SCRIPT>
	</head>
	<style>
		* {
			margin: 0;
			padding: 0;
		}

		#topdiv {	
			height: 100px;
			background-color: aquamarine;
			background-image: linear-gradient(to top, aquamarine, seagreen);
			/* 设计渐变色背景 */
			
		}

		#topdivson1 {
			float: right;
			height: 100px;
			width: 600px;
			text-align: center;
			line-height: 100px;
		}
		#topdivson1{
			color:  black; 
			font-size:  x-large;
		}
		#showTime{
			font-size: small;
		}
		#link{
			font-size:  large;
			font-style: oblique;
			font-weight:bold;
			text-shadow:1px 1px 1px yellow;
		}
		#link a:hover{			/*设置鼠标悬停超链接变红色*/
			color: white;
		}
		#link a{
			color: brown;
		}
	</style>
	<body bgcolor="azure">
		<script>
			window.onload=function(){
				/*创建一个接收ajax返回值的变量*/
				var userInfo;

				/*发送ajax获取用户信息用以需要的位置进行展示*/
				$.ajax({
					type:'post',
					url:"<?php echo base_url('user/get_user_info');?>",
					async:false,
					success:function (response) {
						userInfo = JSON.parse(response);
					}
				});//ajax END

				/*获取用户名和余额以便展示*/
				var name = userInfo[0].name;
				var balance = userInfo[0].balance;

				/*将name存放于hidden域，便于下面的计时器取值，直接参数传值只会显示name一次，计时器再次调用就会显示name undefined*/
				$('#transition').val(name);

				/*调用展示时间函数*/
				getTime();
				setInterval("getTime()", 1000);

				/*存钱按钮被点击*/
				$("#save_btn").click(function(){
					/*其他业务全部隐藏，存钱业务显示在页面中间*/
					$("#save_iframe").show();
					$("#t").hide();
					$("#get_iframe").hide();
					$("#transfer_iframe").hide();
					$("#select_div").hide();
					$("#destruction_iframe").hide();
				});

				/*点击取钱按钮*/
				$("#get_btn").click(function () {
					$("#get_iframe").show();
					$("#t").hide();
					$("#save_iframe").hide();
					$("#transfer_iframe").hide();
					$("#select_div").hide();
					$("#destruction_iframe").hide();
				});

				/*点击转账按钮*/
				$("#transfer_btn").click(function () {
					$("#transfer_iframe").show();
					$("#t").hide();
					$("#save_iframe").hide();
					$("#get_iframe").hide();
					$("#select_div").hide();
					$("#destruction_iframe").hide();
				});

				/*点击查询余额*/
				$("#select_btn").click(function () {
					/*发送ajax查询用户余额*/
					$.ajax({
						type:'post',
						url:"<?php echo base_url('user/balance');?>",
						success:function (response) {
							$("#h1").html('您的账户余额为：'+response);
						}
					});//ajax END
					$("#select_div").show();
					$("#t").hide();
					$("#save_iframe").hide();
					$("#get_iframe").hide();
					$("#transfer_iframe").hide();
					$("#destruction_iframe").hide();
				});

				/*点击销户*/
				$("#destruction_btn").click(function () {
					$("#destruction_iframe").show();
					$("#t").hide();
					$("#save_iframe").hide();
					$("#get_iframe").hide();
					$("#transfer_iframe").hide();
					$("#select_div").hide();
				});
			}

			function getTime() {
				var d = new Date();
				var year = d.getFullYear(); //获取年份
				var mouth = d.getMonth() + 1; //几月,0~11
				var date = d.getDate(); //几号
				var week = d.getDay(); //周几
				
				var hour = d.getHours(); //获取几点
				var minutes = d.getMinutes(); //获取几分
				var seconds = d.getSeconds(); //获取几秒
				
				if (seconds < 10) {
					seconds = "0" + d.getSeconds();
				}
				if (seconds == 60) {
					seconds = 00;
				}
				
				var shuzi;
				if(week==1){
					shuzi="一";
				}else if(week==2){
					shuzi="二";
				}else if(week==3){
					shuzi="三";
				}
				else if(week==4){
					shuzi="四";
				}
				else if(week==5){
					shuzi="五";
				}
				else if(week==6){
					shuzi="六";
				}
				else{
					shuzi="日";
				}
					
				var s;
				if (hour >= 0 && hour < 6) {
					s = "凌晨";
				} else if (hour >= 6 && hour < 12) {
					s = "上午";
				} else if (hour >= 12 && hour < 18) {
					s = "下午";
				} else {
					s = "晚上";
				}

				document.getElementById("showTime").innerHTML =
					year + "年" +
					mouth + "月" +
					date + "号，" + "星期" +
					shuzi + " " +
					hour + ":" +
					minutes + ":" +
					seconds;
					var user_name=$('#transition').val();
				document.getElementById("topdivson1").innerHTML=s+"好，欢迎您："+user_name;
				
			}
		</script>

<!-- **********************************头部信息************************************************************************************************************** -->
		<div id="topdiv">
			<input id="transition" type="hidden"><!--过渡存值取值使用-->
			<a href="<?php echo base_url('user');  ?>"><img src="<?php echo base_url('application/views/picture/bankHead.jpg');?>" style="height: 100px; width: 15%;" /></a>
			<div id="topdivson1"></div><!--取出用户名在这儿-->
		</div>
<!-- ************************************************************************************************************************************************ -->
<!-- ************************************************************************************************************************************************ -->
			<div>
			<div style="background-color: skyblue;height: 40px;width: 15%; float: left;text-align: center;line-height: 40px;border-radius:60%;" id="showTime">
			</div><!-- logo下方显示时间用的div -->
			
			<div style="background-image: linear-gradient(to top, seagreen, aquamarine);height: 40px;" id="link"><!-- 时间右侧超链接表 -->
			<span style="padding-left: 10%;text-align: center;line-height: 40px;"><a href="javascript:;" id="save_btn" style="text-decoration:none">存钱</a></span>
			<span style="padding-left: 10%;text-align: center;line-height: 40px;"><a href="javascript:;" id="get_btn" style="text-decoration:none">取钱</a></span>
			<span style="padding-left: 10%;text-align: center;line-height: 40px;"><a href="javascript:;" id="transfer_btn" style="text-decoration:none">转账</a></span>
			<span style="padding-left: 10%;text-align: center;line-height: 40px;"><a href="javascript:;" id="select_btn" style="text-decoration:none">查询余额</a></span>
			<span style="padding-left: 10%;text-align: center;line-height: 40px;"><a href="javascript:;" id="destruction_btn" style="text-decoration:none">销户</a></span>
			<span style="padding-left: 10%;text-align: center;line-height: 40px;"><a href="<?php echo base_url('user/login_out');?>" style="text-decoration:none">退出</a></span>
			</div>
			
			</div>
<!-- ************************************************************************************************************************************************ -->
<!-- ***********************************中间内容************************************************************************************************************* -->
			<!-- 在中间内容部分显示不同的业务页面 -->
			<div style="height: 500px;">

				<!--存钱iframe-->
				<div style="text-align: center">
					<iframe id="save_iframe" style="display: none;" width=500 height=500 src= "<?php echo base_url('user/save');?>" scrolling= "auto " frameborder= "0 "> </iframe>
				</div>
				<!--取钱iframe-->
				<div style="text-align: center">
					<iframe id="get_iframe" style="display: none;" width=500 height=500 src= "<?php echo base_url('user/get');?>" scrolling= "auto " frameborder= "0 "> </iframe>
				</div>
				<!--转账iframe-->
				<div style="text-align: center">
					<iframe id="transfer_iframe" style="display: none;" width=500 height=500 src= "<?php echo base_url('user/transfer');?>" scrolling= "auto " frameborder= "0 "> </iframe>
				</div>
				<!--查询余额iframe-->
				<div id="select_div" style="text-align: center;display: none;" width=500 height=500>
					<div style="padding-top: 230px"><h1 id="h1"></h1></div>
				</div>
				<!--销户-->
				<div style="text-align: center">
					<iframe id="destruction_iframe" style="display: none;" width=500 height=500 src= "<?php echo base_url('user/destruction');?>" scrolling= "auto " frameborder= "0 "> </iframe>
				</div>
				<table id="t">
				<tr>
					<td>
						<div class="area">

							<a id=prev class="prevBtn qq" href="javascript:void(0)"></a>

							<a id=next class="nextBtn qq" href="javascript:void(0)"></a>

							<div id=js class="js">

								<div class="box01">

									<img onClick=inc1() src="<?php echo base_url('application/views/images/1.jpg');?>" style="width: 100%;">

									<img onClick=inc2()  style="DISPLAY: none;width: 100%;" src="<?php echo base_url('application/views/images/2.jpg');?>">

									<img onClick=inc3() style="DISPLAY: none;width: 100%;"  src="<?php echo base_url('application/views/images/3.jpg');?>">

								</div>

								<div class="bg"></div>

								<div id=jsNav class=jsNav>

									<a class="trigger imgSelected" href="javascript:void(0)">1</a>

									<a class="trigger" href="javascript:void(0)">2</a>

									<a class="trigger" href="javascript:void(0)">3</a>

								</div>

							</div>

						</div>
					</td>
				</tr>
			</table>

			</div>
<!-- ************************************************************************************************************************************************ -->
<!-- ********************************尾部信息**************************************************************************************************************** -->
			<div style="padding-top: 2%;">
			<table style="margin: 0 auto;">
				<tr>
					<td>
						<div style="text-align: center;font-size: larger;">
						njcit
						</div>
					</td>
				</tr>
				<tr>
					<td>
						<div style="text-align: center;font-size: larger;">
						技术支持：仙林校区 XQX
						</div>
					</td>
				</tr>
			</table>
			</div>
		
<!-- ************************************************************************************************************************************************ -->
<!-- ************************************************************************************************************************************************ -->
		<script type="text/javascript">
		
		$(document).ready(function(){
		
		  $(".area").hover(function(){
		
			  $(this).find(".qq").show(100);}
		
			  ,function(){
		
				$(this).find(".qq").hide(100);
		
			});
		
		});
		
		</script>
		
		<script>
			function inc1(){
				window.open('http://ewealth.abchina.com/fs/NYAD193601.htm');
			}
			function inc2(){
				window.open('https://eapply.abchina.com/coin/');
			}
			function inc3(){
				window.open('http://ewealth.abchina.com/fs/AKSSF1.htm');
			}
		</script>

	</body>
</html>
